<?php
    include('config.php');

    function CheckLoginInDB($username,$password)
    {
        global $conn;

        $pwdmd5 = md5($password);
        $username = addslashes($username);
        $username = htmlspecialchars($username);
        $username = mysql_escape_string($username);
        $qry = "Select * from tbl_user ".
                " where username='$username' and password='$pwdmd5' ";
//var_dump($qry); exit;
        $result = mysql_query($qry, $conn);

        if(!$result || mysql_num_rows($result) <= 0)
        {
            return false;
        }
        return true;
    }
?>	
